package com.newcoin.xgb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newcoin.xgb.entity.XgbAccount;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public interface AccountMapper extends BaseMapper<XgbAccount> {

    /**
     * 获取团队理财总余额
     * @param path
     * @return
     */
    BigDecimal getTeamFinancialBalance(@Param("path") String path);


    /**
     * 获取团队总余额
     * @param path
     * @return
     */
    BigDecimal getTeamBalance(@Param("path") String path);

    /**
     * 下级佣金返回
     * @param bd
     * @return
     */
    int setBalance(@Param("bd") BigDecimal bd,@Param("id") Long id);
}
